# 构建与推送 start

.PHONY:build-dist
build-dist:
	yarn build

.PHONY:build-dist-test
build-dist-test:
	yarn buildtest

# 构建镜像
.PHONY:build
build:
	sudo docker buildx build --platform=linux/amd64  -f ./Dockerfile . -t  ??:${tag}

# 推送到镜像仓库
.PHONY:push-local
push-local:
	docker push  ??:${tag}

# 本地删除
.PHONY:rmi
rmi:
	docker rmi  ??:${tag}

# 运行命令
.PHONY:run
run:
	make build-dist && make build && make push && make rmi

# 运行命令
.PHONY:run-test
run-test:
	make build-dist-test && make build && make push && make rmi


# 03-推送到镜像仓库
.PHONY:push
push:
	docker push  ??:${tag}

